{% extends 'dashboard/layout.html' %}
{% load i18n %}

{% block body_class %}{{ block.super }} create-page{% endblock %}

{% block breadcrumbs %}
    <ul class="breadcrumb">
        <li>
            <a href="{% url 'dashboard:index' %}">{% trans "Dashboard" %}</a>
        </li>
        <li>
        <a href="{% url 'dashboard:catalogue-class-list' %}">{% trans "Product type" %}</a>
    </li>
    <li class="active">{% trans "Delete product type?" %}</li>
</ul>
{% endblock %}

{% block headertext %}
    {{ title }}
{% endblock %}

{% block dashboard_content %}
    {% if disallow %}
        <p>{% trans "Please make sure all products are assigned to another type before deletion." %}</p>
    {% else %}
        <div class="table-header">
            <h2>{% trans "Delete product type" %}</h2>
        </div>
        <form method="post" class="well">
            {% csrf_token %}
            {{ form }}
            <p>
                {% blocktrans with name=object.name %}Delete product type <strong>{{ name }}</strong> - are you sure?{% endblocktrans %}
            </p>
            <div class="form-actions">
                <button type="submit" class="btn btn-danger" data-loading-text="{% trans 'Deleting...' %}">{% trans "Delete" %}</button>
            {% trans "or" %} <a href="{% url 'dashboard:catalogue-class-list' %}">{% trans "cancel" %}</a>
            </div>
        </form>
    {% endif %}
{% endblock %}
